NcApi
Macros | Typedefs | Enumerations | Functions
NeoParser.h File Reference
#include <stdint.h>
#include "NcApi.h"

Macros

#define NCAPI_HOST_PREFIX_SIZE   2
 
#define NCAPI_HOSTACK_LENGTH   2
 
#define NCAPI_HOSTDATA_HEADER_SIZE   5
 
#define NCAPI_HOSTDATA_MIN_LENGTH   (NCAPI_HOSTDATA_HEADER_SIZE+NCAPI_HOST_PREFIX_SIZE)
 
#define NCAPI_HOSTDATAHAPA_HEADER_SIZE   7
 
#define NCAPI_HOSTDATAHAPA_MIN_LENGTH   (NCAPI_HOSTDATAHAPA_HEADER_SIZE+NCAPI_HOST_PREFIX_SIZE)
 
#define NCAPI_HOSTUAPPDATA_HEADER_SIZE   7
 
#define NCAPI_HOSTUAPPDATA_MIN_LENGTH   (NCAPI_HOSTUAPPDATA_HEADER_SIZE+NCAPI_HOST_PREFIX_SIZE)
 
#define NCAPI_HOSTUAPPDATAHAPA_HEADER_SIZE   9
 
#define NCAPI_HOSTUAPPDATAHAPA_MIN_LENGTH   (NCAPI_HOSTUAPPDATAHAPA_HEADER_SIZE+NCAPI_HOST_PREFIX_SIZE)
 
#define NCAPI_NODEINFOREQUEST_LENGTH   0
 
#define NCAPI_NEIGHBORLISTREQUEST_LENGTH   0
 
#define NCAPI_NETCMD_LENGTH   unused
 
#define NCAPI_WESCMD_LENGTH   1
 
#define NCAPI_WESSETUPREQUEST_LENGTH   6
 
#define NCAPI_ALTCMD_LENGTH   1
 
#define NCAPI_NODEINFOREPLY_LENGTH   8
 
#define NCAPI_WESRESPONSE_LENGTH   (7 + WES_APPSETTINGS_LENGTH)
 
#define NCAPI_WESSTATUS_LENGTH   1
 
#define NCAPI_NEIGHBORLISTREPLY_LENGTH   36
 
#define NCAPI_NEIGHBORLISTREPLY_EX_LENGTH   39
 
#define NCAPI_NETCMDRESPONSE_HEADER_SIZE   3
 
#define NCAPI_NETCMDRESPONSE_MIN_LENGTH   5
 

Typedefs

typedef enum NcApiMessageType NcApiMessageType
 

Enumerations

enum  NcApiMessageType {
  CommandUnacknowledgedEnum = 0x02, CommandAcknowledgedEnum = 0x03, NodeInfoRequestEnum = 0x08, NeighborListRequestEnum = 0x09,
  NetCmdEnum = 0x0a, WesCmdEnum = 0x10, WesResponseEnum = 0x11, AltCmdEnum = 0x20,
  HostAckEnum = 0x50, HostNAckEnum = 0x51, HostDataEnum = 0x52, HostDataHapaEnum = 0x53,
  HostUappDataEnum = 0x54, HostUappDataHapaEnum = 0x55, NodeInfoReplyEnum = 0x58, NeighborListReplyEnum = 0x59,
  NetCmdReplyEnum = 0x5a, WesStatusEnum = 0x60, WesSetupRequestEnum = 0x61, CommandRawEnum = 0xff
}
 

Functions

int NcApiIsValidFrameTraceSpecific (uint8_t *buffer, uint16_t bufLength)
 Detmines if the buffer contains a valid TraceFrame message. More...
 
int NcApiIsValidApiFrame (uint8_t *buffer, uint16_t bufLength, uint16_t *outStartAt, uint16_t *outLength)
 Determines if the content in the buffer is a valid Protocol-message. More...
 
int NcApiIsValidSysFrame (uint8_t *buffer, uint16_t bufLength, uint16_t *outStartAt, uint16_t *outLength)
 Determines if the content in the buffer is a valid System-trace-message or a Bootloader-message. More...
 
int NcApiIsMsgReadOtpReply (uint8_t *buffer, uint16_t startAt, uint16_t length)
 Determines whether the message in the buffer contains Uid. More...
 
int NcApiIsMsgGetBootLoaderVersionReply (uint8_t *buffer, uint16_t startAt, uint16_t length)
 Determines whether the message in the buffer contains bootloaderversion. More...
 
int NcApiIsMsgGetProtocolVersionReply (uint8_t *buffer, uint16_t startAt, uint16_t length)
 Determines whether the message in the buffer contains protocolversion. More...
 
void NcApiGetMsgAsHostAck (uint8_t *buffer, tNcApiHostAckNack *p)
 Deserializes the content of the buffer into a corresponding structure. More...
 
void NcApiGetMsgAsHostData (uint8_t *buffer, tNcApiHostData *p)
 Deserializes the content of the buffer into a corresponding structure. More...
 
void NcApiGetMsgAsHostDataHapa (uint8_t *buffer, tNcApiHostDataHapa *p)
 Deserializes the content of the buffer into a corresponding structure. More...
 
void NcApiGetMsgAsHostUappData (uint8_t *buffer, tNcApiHostUappData *p)
 Deserializes the content of the buffer into a corresponding structure. More...
 
void NcApiGetMsgAsHostUappDataHapa (uint8_t *buffer, tNcApiHostUappDataHapa *p)
 Deserializes the content of the buffer into a corresponding structure. More...
 
void NcApiGetMsgAsNodeInfoReply (uint8_t *buffer, tNcApiNodeInfoReply *p)
 Deserializes the content of the buffer into a corresponding structure. More...
 
void NcApiGetMsgAsWesStatus (uint8_t *buffer, tNcApiWesStatus *p)
 Deserializes the content of the buffer into a corresponding structure. More...
 
void NcApiGetMsgAsWesSetupRequest (uint8_t *buffer, tNcApiWesSetupRequest *p)
 Deserializes the content of the buffer into a corresponding structure. More...
 
void NcApiGetMsgAsNodeInfo (uint8_t *buffer, tNcApiNodeInfoReply *p)
 Deserializes the content of the buffer into a corresponding structure. More...
 
void NcApiGetMsgAsNeighborListReply (uint8_t *buffer, tNcApiNeighborListReply *p)
 Deserializes the content of the buffer into a corresponding structure. More...
 
void NcApiGetMsgAsNetCmdResponse (uint8_t *buffer, tNcApiNetCmdReply *p)
 Deserializes the content of the buffer into a corresponding structure. More...
 

Typedef Documentation

Enumeration Type Documentation

Enumerator
CommandUnacknowledgedEnum 
CommandAcknowledgedEnum 
NodeInfoRequestEnum 
NeighborListRequestEnum 
NetCmdEnum 
WesCmdEnum 
WesResponseEnum 
AltCmdEnum 
HostAckEnum 
HostNAckEnum 
HostDataEnum 
HostDataHapaEnum 
HostUappDataEnum 
HostUappDataHapaEnum 
NodeInfoReplyEnum 
NeighborListReplyEnum 
NetCmdReplyEnum 
WesStatusEnum 
WesSetupRequestEnum 
CommandRawEnum 

Function Documentation

void NcApiGetMsgAsHostAck ( uint8_t *  buffer,
tNcApiHostAckNack p 
)
Parameters
bufferBuffer containing message
pInstance to deserialize into
void NcApiGetMsgAsHostData ( uint8_t *  buffer,
tNcApiHostData p 
)
Parameters
bufferBuffer containing message
pInstance to deserialize into
void NcApiGetMsgAsHostDataHapa ( uint8_t *  buffer,
tNcApiHostDataHapa p 
)
Parameters
bufferBuffer containing message
pInstance to deserialize into
void NcApiGetMsgAsHostUappData ( uint8_t *  buffer,
tNcApiHostUappData p 
)
Parameters
bufferBuffer containing message
pInstance to deserialize into
void NcApiGetMsgAsHostUappDataHapa ( uint8_t *  buffer,
tNcApiHostUappDataHapa p 
)
Parameters
bufferBuffer containing message
pInstance to deserialize into
void NcApiGetMsgAsNeighborListReply ( uint8_t *  buffer,
tNcApiNeighborListReply p 
)
Parameters
bufferBuffer containing message
pInstance to deserialize into
void NcApiGetMsgAsNetCmdResponse ( uint8_t *  buffer,
tNcApiNetCmdReply p 
)
Parameters
bufferBuffer containing message
pInstance to deserialize into
void NcApiGetMsgAsNodeInfo ( uint8_t *  buffer,
tNcApiNodeInfoReply p 
)
Parameters
bufferBuffer containing message
pInstance to deserialize into
void NcApiGetMsgAsNodeInfoReply ( uint8_t *  buffer,
tNcApiNodeInfoReply p 
)
Parameters
bufferBuffer containing message
pInstance to deserialize into
void NcApiGetMsgAsWesSetupRequest ( uint8_t *  buffer,
tNcApiWesSetupRequest p 
)
Parameters
bufferBuffer containing message
pInstance to deserialize into
void NcApiGetMsgAsWesStatus ( uint8_t *  buffer,
tNcApiWesStatus p 
)
Parameters
bufferBuffer containing message
pInstance to deserialize into
int NcApiIsMsgGetBootLoaderVersionReply ( uint8_t *  buffer,
uint16_t  startAt,
uint16_t  length 
)
Parameters
bufferBuffer containing message
startAtIndex of message start in buffer
lengthMessage length
Returns
1==true 0==false
int NcApiIsMsgGetProtocolVersionReply ( uint8_t *  buffer,
uint16_t  startAt,
uint16_t  length 
)
Parameters
bufferBuffer containing message
startAtIndex of message start in buffer
lengthMessage length
Returns
1==true 0==false
int NcApiIsMsgReadOtpReply ( uint8_t *  buffer,
uint16_t  startAt,
uint16_t  length 
)
Parameters
bufferBuffer containing message
startAtIndex of message start in buffer
lengthMessage length
Returns
1==true 0==false
int NcApiIsValidApiFrame ( uint8_t *  buffer,
uint16_t  bufLength,
uint16_t *  outStartAt,
uint16_t *  outLength 
)
Parameters
bufferReceived RX-data
bufLengthNumber of received bytes
[out]outStartAtIf a message was found, index into buffer where the message begins
[out]outLengthIf a message was found, the message length
Returns
1==true 0==false
int NcApiIsValidFrameTraceSpecific ( uint8_t *  buffer,
uint16_t  bufLength 
)
Parameters
bufferReceived RX-data
bufLengthBuffer length
Returns
1==true 0==false
int NcApiIsValidSysFrame ( uint8_t *  buffer,
uint16_t  bufLength,
uint16_t *  outStartAt,
uint16_t *  outLength 
)
Parameters
bufferReceived RX-data
bufLengthNumber of received bytes
[out]outStartAtIf a message was found, index into buffer where the message begins
[out]outLengthIf a message was found, the message length
Returns
1==true 0==false